package dao;

import entity.Employ;
import entity.Users;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Init {
    public static Map<Integer, Employ>employMap=new HashMap<>();
    public static List<Users>usersList=new ArrayList<>();
    public static SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");

    static {
        try {
            Employ employ1=new Employ(1,"张三","程序员",simpleDateFormat.parse("2018-12-15"),6500.5);
            Employ employ2=new Employ(2,"李四","程序员",simpleDateFormat.parse("2017-11-25"),7500.0);
            Employ employ3=new Employ(3,"王五","经理",simpleDateFormat.parse("2015-10-14"),1500.5);
            employMap.put(employ1.getID(),employ1);
            employMap.put(employ2.getID(),employ2);
            employMap.put(employ3.getID(),employ3);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    static {
        Users users1=new Users("黄蓉","123456");
        Users users2=new Users("郭靖","123456");
        usersList.add(users1);
        usersList.add(users2);
    }
}
